import * as echarts from "echarts";
import ReactECharts from "echarts-for-react";
const LvavlEcharts = () => {
  const graphic3 = new echarts.graphic.LinearGradient(0, 0, 1, 0, [
    { offset: 0, color: "#ff5f1a" },
    { offset: 0.25, color: "#ffdf05" },
    { offset: 0.5, color: "#78e54d" },
    { offset: 0.75, color: "#4ae664" },
    { offset: 1, color: "#36cdff" },

  ]);
  const option = {

    grid: {
      left: 10,
      right: 10,
      top: 100,
      containLabel: false,
    },
    xAxis: [
      {
        axisLabel: {
          show: false, //让Y轴数据不显示
        },
        show: false,
      },
      {
        show: false,
      },
    ],
    yAxis: [
      {
        type: "category",
        axisLabel: {
          show: false, //让Y轴数据不显示
        },

        axisTick: {
          show: false, //隐藏Y轴刻度
        },
        axisLine: {
          show: false, //隐藏Y轴线段
        },
      },
    ],
    series: [
  
      {
        show: true,
        type: "bar",
        barGap: "-100%",
        barWidth: "8px", //统计条宽度
        itemStyle: {
          normal: {
      
            color: graphic3,
          },
        },
        label: {
          color:'#f5f4ee',
          fontSize: 14,
          show: true,
          position: [0, "-220%"],
          formatter:'LEAVL'
        },

        data: [200],
      },
    ],
  };

  return (
    <ReactECharts
      option={option}
      style={{
        height: "40px",
        width: "100%",
      }}
    />
  );
};

export default LvavlEcharts;
